package org.eiahe.hr.attendance.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.eiahe.hr.attendance.domain.SpecialAttendanceRule;
import org.eiahe.hr.attendance.domain.vo.SpecialAttendanceRuleVo;
import org.ehe.common.mybatis.core.mapper.BaseMapperPlus;

import java.time.LocalDate;
import java.util.List;

/**
 * 特殊员工考勤规则Mapper接口
 *
 * @author zhangnn
 */
public interface SpecialAttendanceRuleMapper extends BaseMapperPlus<SpecialAttendanceRule, SpecialAttendanceRuleVo> {

    /**
     * 查询特殊规则列表(包含员工姓名、审批人姓名)
     */
    List<SpecialAttendanceRuleVo> selectVoListWithDetails(
            @Param(Constants.WRAPPER) Wrapper<SpecialAttendanceRule> queryWrapper);

    /**
     * 查询即将到期的规则(未提醒的)
     */
    List<SpecialAttendanceRuleVo> selectExpiringRules(@Param("days") Integer days,
            @Param("currentDate") LocalDate currentDate);
}
